import Vue from 'vue'

import Cookies from 'js-cookie'
import './styles/index.scss'
// import 'normalize.css/normalize.css'

import Element from 'element-ui'
import './styles/element-variables.scss'

import App from './App.vue'
import router from './router'
import store from './store'
import ErrorPlugin from './config/errorPlugin'

import './icons'
import './permisson'

if (process.env.NODE_ENV === 'development') {
  const { mockXHR } = require('../mock')
  mockXHR()
}

Vue.config.productionTip = false

Vue.use(ErrorPlugin)
Vue.use(Element, {
  size: Cookies.get('size') || 'small' // set element-ui default size
})

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
